#include<iostream>
#include<string>
#include<map>
using namespace std;
typedef long long LL;
string s;
map<char, int>mp;
int main()
{
	getline(cin, s);
	mp[' '] = 1;
	mp['a'] = mp['d'] = mp['g'] = mp['j'] = mp['m'] = mp['p'] = mp['t'] = mp['w'] = 1;
	mp['b'] = mp['e'] = mp['h'] = mp['k'] = mp['n'] = mp['q'] = mp['u'] = mp['x'] = 2;
	mp['c'] = mp['f'] = mp['i'] = mp['l'] = mp['o'] = mp['r'] = mp['v'] = mp['y'] = 3;
	mp['s'] = mp['z'] = 4;
	LL ans = 0;
	int n = s.size();
	for (int i = 0; i < n; i++)ans += mp[s[i]];
	cout << ans << endl;
	return 0;
}